<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:59:"D:\git\tdw\public/../application/index\view\cart\index.html";i:1548571306;s:50:"D:\git\tdw\application\index\view\common\head.html";i:1548571306;s:49:"D:\git\tdw\application\index\view\common\top.html";i:1548571306;s:50:"D:\git\tdw\application\index\view\common\foot.html";i:1549867896;}*/ ?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>购物车 - 胎大王</title>
	<meta charset="UTF-8">
	<!-- Bootstrap CSS-->
  <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css
">

  <!-- Linearicon CSS-->
    <link rel="stylesheet" href="/css/linearicons.min.css">
    <!-- Font Awesome CSS-->
    <link rel="stylesheet" type="text/css" href="http://www.jq22.com/jquery/font-awesome.4.6.0.css">

  <!-- Animate CSS-->
  <link rel="stylesheet" href="/css/animate.css">
  <!-- Owl Carousel CSS-->
  <link rel="stylesheet" href="/css/owl.carousel.min.css">
  <!-- Slick CSS-->
  <link rel="stylesheet" href="/css/slick.css">
  <!-- Meanmenu CSS-->
  <link rel="stylesheet" href="/css/meanmenu.min.css">
  <!-- Easyzoom CSS-->
  <link rel="stylesheet" href="/css/easyzoom.css">
  <!-- Venobox CSS-->
  <link rel="stylesheet" href="/css/venobox.css">
  <!-- Jquery Ui CSS-->
  <link rel="stylesheet" href="/css/jquery-ui.css">
  <!-- Nice Select CSS-->
  <link rel="stylesheet" href="/css/nice-select.css">
  <!-- Style CSS -->
  <link rel="stylesheet" href="/style.css">
  <!-- Responsive CSS -->
  <link rel="stylesheet" href="/css/responsive.css">
  <!-- Modernizr Js -->
  <script src="/js/vendor/modernizr-2.8.3.min.js"></script>
  
	<script src="/js/cart.js"></script>
	<script src="/js/layer/layer.js"></script>
</head>
<body>

<div class="container">
<div class="head">
	<div class="contai">
		<div class="pure-g">
			<div class="pure-u-8-24"><p>胎大王产业供应链共享服务平台欢迎您！</p></div>
			<div class="pure-u-16-24 right">
				<style>
					.indexLogin{display:none;}
					.memberLogin{display:block;}
				</style>
				<div class="indexLogin">
					<p>您好，请<a href="/login.html"  target="_self">登录</a></p><p class="jiange"> &nbsp;</p>
					<p id="bus_wechat">
						<a href="javascript:;">企业微信</a><span><img src="/images/ewm-big.jpg"></span></p>

				</div>
				<div class="memberLogin">
					<p>您好，<span class="memberPhone"></span></p><p class="jiange"> &nbsp;</p>
					<p><a href="/member.html"  target="_self">个人中心</a><p class="jiange"> &nbsp;</p>
					<p><a href="/logout.html"  target="_self">退出登录</a></p>
				</div>

			</div>

		</div>
	</div>
</div>
<div class="nav">
	<div class="contai">
		<div class="pure-g">
			<div class="pure-u-3-24">
				<h1><a target="_self" href="/" title="胎大王"><img src="/images/logo.jpg" alt="胎大王"></a></h1>
			</div>
			<div class="pure-u-21-24">
				<div class="menu">
				        <?php 
                        if(empty($act))
                        {
                            $act = 1;
                        }
                         ?>
					<ul>
						<li><strong><a href="/"  <?php if($act=='index'): ?>class="active"<?php else: endif; ?> >首页</a></strong></li>
						<li><strong><a href="/notice.html"  <?php if($act=='notice'): ?>class="active"<?php else: endif; ?>>信息公告</a></strong></li>
						<li><strong><a href="/product.html"  <?php if($act=='product'): ?>class="active"<?php else: endif; ?>>产品列表</a></strong></li>
						<li><strong><a href="/News/index.html"  <?php if($act=='news'): ?>class="active"<?php else: endif; ?>>新闻资讯</a></strong></li>
						<li><strong><a href="/member.html"  <?php if($act=='member'): ?>class="active"<?php else: endif; ?>>个人中心</a></strong></li>
						<li><strong><a href="/merchants.html"  <?php if($act=='merchants'): ?>class="active"<?php else: endif; ?>>招商加盟</a></strong></li>
						<li class="cart"><a href="/cart.html" class="button-secondary pure-button"><i class="fa fa-shopping-cart"></i> 购物车详情</a>
					</ul>
				</div>
			</div>
		</div>
	</div>
</div>

	<div class="cart">
		<div class="cart-banner"></div>
		<div class="contai">
			<span class="f-bk30"></span><span class="f-bk10"></span>
			<div class="cart-con">
				<form id="formData" action="/cartSubmit.html" method="post">
					<table id="cartTable" class="table"  valign="middle">
						<tr>
							<th width="180">全选</th>
							<th>商品</th>
							<th width="120" class="f-textc">单价</th>

							<th width="80">数量</th>
							<th width="120">小计</th>
							<th width="80">操作</th>
						</tr>
						<?php if(empty($data) || (($data instanceof \think\Collection || $data instanceof \think\Paginator ) && $data->isEmpty())): ?>
						<tr class="cart-info"  valign="top">
							<td colspan="6">
								<div>
									<p>您的购物车还没有添加商品</p>
								</div>
							</td>
						</tr>
						<?php else: if($data['code']==10004): ?>
						<tr class="cart-info"  valign="top">
							<td colspan="6">
								<div>
									<p>您的购物车还没有添加商品</p>
								</div>
							</td>
						</tr>
						<?php elseif($data['code']==1004): ?>
						<tr class="cart-info"  valign="top">
							<td colspan="6">
								<div>
									<p>您的购物车还没有添加商品</p>
								</div>
							</td>
						</tr>
						<?php else: if(is_array($data['data']['cartItemArray']) || $data['data']['cartItemArray'] instanceof \think\Collection || $data['data']['cartItemArray'] instanceof \think\Paginator): $i = 0; $__LIST__ = $data['data']['cartItemArray'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
						<tr class="imfor">
							<td class="pic"><input type='checkbox' name="item[<?php echo $vo['productId']; ?>]" class="Each"><a target="_blank" <?php if($vo['type']=='deposit'): ?>href="/depositDetail.html?id=<?php echo $vo['productId']; ?>" <?php else: ?>href="/dividendDetail.html?id=<?php echo $vo['productId']; ?>"<?php endif; ?>><img src="<?php echo $vo['image']; ?>" alt="<?php echo $vo['name']; ?>"></a></td>
							<td class="tit"><p><a target="_blank"<?php if($vo['type']=='deposit'): ?>href="/depositDetail.html?id=<?php echo $vo['productId']; ?>" <?php else: ?>href="/dividendDetail.html?id=<?php echo $vo['productId']; ?>"<?php endif; ?>><?php echo $vo['name']; ?></a></p>商品类型：<?php if($vo['type']=='deposit'): ?>即时订单商品<?php else: ?>分红式订单商品<?php endif; ?></td><input type="hidden" value="<?php echo $vo['productId']; ?>" name='productId' />
							<td class="pices"><p>￥<?php echo $vo['price']; ?></p></td>
							<td class="num"><span class="reduc">&nbsp;-&nbsp;</span><input class="numinput" type="text" name='quantity[<?php echo $vo['productId']; ?>]' value="<?php echo $vo['quantity']; ?>" /><span class="add">&nbsp;+</span></td>
							<td class="totle">￥<?php echo $vo['subtotal']; ?></td>
							<td class="del"><a href="javascript:;" target="_self" data-del='<?php echo $vo['productId']; ?>'><i class="fa fa-close"></i>删除商品</a></td>
						</tr>						
						<?php endforeach; endif; else: echo "" ;endif; ?>
						<span class="f-bk30"></span>
						<tr>
							<td colspan="6" >
								<div class="cart-bottom">
									<div>
										<ul>
											<li><label><input type='checkbox' class="checkboxall2"  /> 全选</label>&emsp;&emsp;</li>
											<li><a target="_self"  class="foot_del">删除选中的商品</a>&emsp;&emsp;</li>
										</ul>
									</div>
									<span class="f-bk3"></span>
								</div>
							</td>
						</tr>
						<tr class="cart-bm">
							<td colspan="6">
								<div class="f-fr ">
									<button type="button" class="button-red pure-button submit" style="width:150px;">立即结算</button>
									<span class="f-bk10"></span>
								</div>
								<div class="f-fr jg">商品总价：<span class="amount">￥0</span><span class="fun-red">元</span></div>

							</td>
						</tr>						
						<?php endif; endif; ?>
					</table>
				</form>
				<span class="f-bk30"></span>
			</div>
			<span class="f-bk20"></span>
		</div>
	</div>

	<footer>
	<div class="footer-container">
		<!--Footer Top Area Start-->
		<div class="footer-top-area black-bg">
			<div class="container">
				<div class="row">
					<div class="col-lg-3 col-md-6">
						<!--Single Footer Widget Start-->
						<div class="single-footer-widget mb-40">
							<div class="footer-title">
								<h3>关于我们</h3>
							</div>
							<ul class="link-widget">
								<li><a href="about.html">平台简介</a></li>
								<li><a href="contact.html">联系方式</a></li>
								<li><a href="#">商务合作</a></li>
								<li><a href="#">品牌入驻</a></li>
								<li><a href="shop.html">人才招聘</a></li>
							</ul>
						</div>
						<!--Single Footer Widget End-->
					</div>
					<div class="col-lg-3 col-md-6">
						<!--Single Footer Widget Start-->
						<div class="single-footer-widget mb-40">
							<div class="footer-title">
								<h3>购物指南</h3>
							</div>
							<ul class="link-widget">
								<li><a href="faq.html">常见问题</a></li>
								<li><a href="contact.html">服务条款</a></li>
								<li><a href="#">下单流程</a></li>
								<li><a href="#">操作手册</a></li>
								<li><a href="#">发票制度</a></li>
							</ul>
						</div>
						<!--Single Footer Widget End-->
					</div>
					<div class="col-lg-3 col-md-6">
						<!--Single Footer Widget Start-->
						<div class="single-footer-widget mb-40">
							<div class="footer-title">
								<h3>物流服务</h3>
							</div>
							<ul class="link-widget">
								<li><a href="#">配送方式</a></li>
								<li><a href="#">仓储布局</a></li>
								<li><a href="#">配送费用</a></li>
								<li><a href="#">物流合作</a></li </ul> </div> <!--Single Footer Widget End-->
						</div>
						<div class="col-lg-3 col-md-6">
							<!--Single Footer Widget Start-->
							<div class="single-footer-widget mb-40">
								<div class="footer-title">
									<h3>售后服务</h3>
								</div>
								<ul class="link-widget">
									<li><a href="#">理赔标准</a></li>
									<li><a href="#">理赔时效</a></li>
									<li><a href="#">退换货制度</a></li>
								</ul>
							</div>
							<!--Single Footer Widget End-->
						</div>
					</div>
				</div>
			</div>
			<!--Footer Top Area End-->
			<!--Footer Middle Area Start-->
			<div class="footer-middle-area black-bg">
				<div class="container">
					<div class="row">
						<div class="col-lg-3 col-md-6">
							<!--Single Footer Widget Start-->
							<div class="single-footer-widget mb-30">
								<div class="footer-logo">
									<a href="index.html"><img src="/img/logo/logo-footer.png" alt=""></a>
								</div>
							</div>
							<!--Single Footer Widget End-->
						</div>
						<div class="col-lg-3 col-md-6">
							<!--Single Footer Widget Start-->
							<div class="single-footer-widget mb-30">
								<div class="footer-info">
									<div class="icon">
										<i class="fa fa-home"></i>
									</div>
									<p>地址 : 山东省东营市广饶县大王经济开发区</p>
								</div>
							</div>
							<!--Single Footer Widget End-->
						</div>
						<div class="col-lg-3 col-md-6">
							<!--Single Footer Widget Start-->
							<div class="single-footer-widget mb-30">
								<div class="footer-info">
									<div class="icon">
										<i class="fa fa-envelope-open-o"></i>
									</div>
									<p>邮箱: <br>tdw@tdw360.com</p>
								</div>
							</div>
							<!--Single Footer Widget End-->
						</div>
						<div class="col-lg-3 col-md-6">
							<!--Single Footer Widget Start-->
							<div class="single-footer-widget mb-30">
								<div class="footer-info">
									<div class="icon">
										<i class="fa fa-mobile"></i>
									</div>
									<p>电话: <br>(+86) 400 002 8181</p>
								</div>
							</div>
							<!--Single Footer Widget End-->
						</div>
					</div>
				</div>
			</div>
			<!--Footer Middle Area End-->
			<!--Footer Bottom Area Start-->
			<div class="footer-bottom-area black-bg pt-50 pb-50">
				<div class="container">
					<div class="row">
						<div class="col-md-12">
							<!--Footer Payment Start-->
							<div class="footer-payments-image">
								<img src="/img/payment/payment-icon.png" alt="">
							</div>
							<!--Footer Payment End-->
							<!--Footer Menu Start-->
							<div class="footer-menu text-center">
								<nav>
									<ul>
										<li><a href="#">鲁ICP备 14034560-1号</a></li>
										<li><a href="#">鲁公网安备37052302000157号</a></li>
										<li><a href="#">电信增值业务许可证</a></li>
									</ul>
								</nav>
							</div>
							<!--Footer Menu End-->
							<!--Footer Copyright Start-->
							<div class="footer-copyright">
								<p>Copyright © <a href="#">胎大王信息科技有限公司 2014-2019</a> All Rights Reserved</p>
							</div>
							<!--Footer Copyright End-->
						</div>
					</div>
				</div>
			</div>
			<!--Footer Bottom Area End-->
		</div>
</footer>
<!--Jquery 1.12.4-->
<script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<!--Popper-->
<script src="/js/popper.min.js"></script>
<!--Bootstrap-->
<script src="/js/bootstrap.min.js"></script>
<!--Imagesloaded-->
<script src="/js/imagesloaded.pkgd.min.js"></script>
<!--Isotope-->
<script src="/js/isotope.pkgd.min.js"></script>
<!--Waypoints-->
<script src="/js/waypoints.min.js"></script>
<!--Counterup-->
<script src="/js/jquery.counterup.min.js"></script>
<!--Carousel-->
<script src="/js/owl.carousel.min.js"></script>
<!--Slick-->
<script src="/js/slick.min.js"></script>
<!--Meanmenu-->
<script src="/js/jquery.meanmenu.min.js"></script>
<!--Easyzoom-->
<script src="/js/easyzoom.min.js"></script>
<!--Nice Select-->
<script src="/js/jquery.nice-select.min.js"></script>
<!--ScrollUp-->
<script src="/js/jquery.scrollUp.min.js"></script>
<!--Wow-->
<script src="/js/wow.min.js"></script>
<!--Venobox-->
<script src="/js/venobox.min.js"></script>
<!--Jquery Ui-->
<script src="http://cdn.bootcss.com/jqueryui/1.11.0/jquery-ui.min.js"></script>
<!--Countdown-->
<script src="/js/jquery.countdown.min.js"></script>
<!--Plugins-->
<script src="/js/plugins.js"></script>
<!--Main Js-->
<script src="/js/main.js"></script>

<script src="/js/jquery.cookie.js"></script>
<script>
	$(function () {
		var userInfo = $.cookie('userInfo');
		if (userInfo != null) {
			$(".indexLogin").css("display", "none");
			$(".memberLogin").css("display", "block");
			var str = userInfo.replace(/^think:/, '');
			userInfo = JSON.parse(str);
			//console.log(JSON.parse(str));
			$(".memberLogin .memberPhone").text(userInfo['username']);
		} else {
			$(".indexLogin").css("display", "block");
			$(".memberLogin").css("display", "none");
		}

	});
</script>
<script type="text/javascript">
	$('#bus_wechat').hover(function () { $(this).find('span').css('display', 'inline-block') }, function () { $(this).find('span').css('display', 'none') })
</script>
</div>
<script>
$(function(){
	//删除当前行
	$(".del").click(function() {
		var that = this
		layer.confirm("您确定要删除吗？",{btn:['确认','取消']},function(btn){
			var id = $(that).find('a').attr('data-del')+'-';
			$.ajax({
				url: "/Cart/delete.html",
				type: "POST",
				data: {id:id},
				dataType: "json",
				cache: false,
				success: function(data) {
					if(data.code==1||data.code==10004){
						layer.alert("删除成功",function(){
							window.location.href='/cart.html';					
						});	
					}else if(data.code==1004){
						layer.alert(data.msg,function(){
							window.location.href='/login/jump/cart.html';					
						});						
					}else{
						layer.alert(data.msg);
					}
				}
			});			
		});			
	})
	$(".foot_del").click(function() {
		var that = this
		var sum= '';
		$(".Each:checked").each(function() {
			sum += $(this).parents('.imfor').find("input[type='hidden']").val()+'-';
		})
		if(sum==''){
			layer.alert("请选择商品!");
			return false;
		}
		layer.confirm("您确定要删除吗？",{btn:['确认','取消']},function(btn){
			$.ajax({
				url: "/Cart/delete.html",
				type: "POST",
				data: {id:sum},
				dataType: "json",
				cache: false,
				success: function(data) {
					if(data.code==1||data.code==10004){
						layer.alert("删除成功",function(){
							window.location.href='/cart.html';					
						});	
					}else if(data.code==1004){
						layer.alert(data.msg,function(){
							window.location.href='/login/jump/cart.html';					
						});						
					}else{
						layer.alert(data.msg);
					}
				}
			});
		});
	});
	$(".submit").click(function() {
		$(".submit").attr({"disabled":"disabled"});
		$("#formData").submit();
		var index = layer.load(0, {shade: [0.5,'#ccc']}); //0代表加载的风格，支持0-2
	});
});
</script>
</body>
</html>